/* vue.groovy
    ##################################################
    # Created by zy                        #
    # Plugin install:  build user vars, vue                                                #
    # A Part of the Project jenkins-library          #
    ##################################################
*/

package org.devops
def nbuild(npmcmd,change_profile_dir,git_profile_path,nodebuildtag){
    sh """
        if [ $change_profile_dir == 0  ]; then cd $git_profile_path; fi
        pwd
    	rm -rf dist/*
        npm -v
        cnpm -v
        node -v
        npm config set registry http://registry.npm.taobao.org/ 
        $npmcmd install
        $npmcmd run build$nodebuildtag
        tar cjf dist.tar.gz dist
    """
}

